<template>
  <button class="todo-clear-button" @click="onClick">清空</button>
</template>

<!-- <script>
export default {
  inject: ["abcd"],

  methods: {
    onClick() {
      this.abcd();
    },
  },
};
</script> -->

<!-- <script>
import { inject } from "vue";

export default {
  setup() {
    const onClick = inject("abcd");
    return {
      onClick,
    };
  },
};
</script> -->

<script setup>
import { inject } from "vue";

const a = inject("abcd");
const b = inject("defg");

console.log("bbbb", b);

const onClick = () => {
  a("123");
};
</script>

<style scoped lang="scss">
.todo-clear-button {
  margin-left: 10px;
  padding: 0 10px;
  height: 36px;
  font-size: 16px;
  border-color: #f56c6c;
  background-color: #f56c6c;
}
</style>
